﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;

public partial class OprrecordDetail : System.Web.UI.Page
{
    public Entities.Work work;
    public string username;
    public string flowname;
    public string files;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            string work_id = Request.QueryString["work_id"];

            int int_work_id = int.Parse(work_id);

            DAL.WorkDALs workdals = new DAL.WorkDALs();
            work = workdals.GetByID(int_work_id);


            Flow flow =  new DAL.FlowDALs().GetByID(work.Flow_id);
            flowname = flow.Name;


            DAL.Work_userDALs work_userdals = new DAL.Work_userDALs();
            System.Collections.Generic.IList<Work_user> list1 = work_userdals.GetByWorkId(work.Work_id);
            System.Collections.Generic.IList<User> lst = new System.Collections.Generic.List<User>();
            DAL.UserDALs userdals = new DAL.UserDALs();
 
            foreach (Work_user work_user in list1)
            {
                int id = work_user.User_id;

                username += userdals.GetByID(id).User_name;

            }

            files = work.Files.Replace("\r\n", "<br/>");
            this.HiddenWorkId.Value = work_id;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.Response.Redirect("addOprRecord.aspx?work_id=" + this.HiddenWorkId.Value);
    }
}
